﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>


<%


dim Action,txt,nid
dim id,rs,sql
dim listid,pageid,reid

		listid=Request.QueryString("listid")
		if not isnumeric(listid) then listid=0
		if listid="" then listid=0
		listid=clng(listid)
		reid=Request.QueryString("reid")
		if not isnumeric(reid) then reid=0
		if reid="" then reid=0
		reid=clng(reid)
		id=Request.QueryString("id")
		if not isnumeric(id) then id=0
		if id="" then id=0
		id=clng(id)

		pageid=Request.QueryString("pageid")
		if not isnumeric(pageid) then pageid=1
		if pageid="" then pageid=1
		pageid=clng(pageid)

		Action=Request.QueryString("Action")

	if Action="delrep" then
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select nid from qingtian_bbs_reforum where [id]="&reid&""
		Rs.Open Sql,conn,1,1
		if not (rs.bof and rs.eof) then
			nid=rs("nid")
		else
			nid=0
		end if
		Rs.close
		set rs=nothing
	elseif Action="del" or Action="dinrep" or Action="qudrep" then
		Set Rs = Server.CreateObject("Adodb.Recordset")
		Sql = "select nid from qingtian_bbs_forum where [id]="&id&""
		Rs.Open Sql,conn,1,1
		if not (rs.bof and rs.eof) then
			nid=rs("nid")
		else
			nid=0
		end if
		Rs.close
		set rs=nothing
	end if


	select case Action
	case "zuan"
		txt="加专"
	case "jh"
		txt="加精"
	case "jt"
		txt="置顶"
	case "jc"
		txt="锁定"
	case "move"
		txt="转移"
	case "cc"
		txt="置底"
	case "tc"
		txt="提升"
	case "del"
		txt="删除"
	case "delrep"
		txt="删除回复"
	case "xjh"
		txt="去精"
	case "xjt"
		txt="取顶"
	case "xjc"
		txt="解锁"
	case "zh"
		txt="取底"
	case "hf"
		txt="恢复"
	case "qudrep"
		txt="取顶"
	case "dinrep"
		txt="置顶"
	case "vip"
		txt="加VIP"
	case "xvip"
		txt="取消VIP"
	end select
Footmark="帖子"&txt&"操作"
select case v
case "0"
we0="<br/>"
%>
<card id="login" title="帖子<%=txt%>操作"><p align="<%=qingtian.px%>">
<%
case "1"
hr="<hr>"
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
%>
<title>帖子<%=txt%>操作</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%
End Select
if sid="Null" then
%>
	<%=we%>请先登陆再做操作。<%=we0%>
	<%=sou%><a href="/login.asp?sid=<%=sidd%>&amp;url=/bbs/viewv.asp?listid=<%=listid%>@@id=<%=id%>@@pageid=<%=pageid%>">马上登陆</a><%=we0%>
<%
else

		if qingtian.qx("nodel", listid)=true  and Action="del"  then
		%>
		<%=we%>出错啦!你已被禁止在本论坛删除帖子,有任何问题请联系管理员!<%=we0%>
		<%
		elseif qingtian.bz(listid) or (Action="delrep" and cint(nid)=cint(qingtian.nid)) or (Action="del" and cint(nid)=cint(qingtian.nid)) or (Action="dinrep" and cint(nid)=cint(qingtian.nid)) or (Action="qudrep" and cint(nid)=cint(qingtian.nid)) then
		%>
		<%=we%>帖子<%=txt%>操作<%=we0%>
		<%if Action="move" then%>
			<%=sou%>选择论坛分类<%=we0%>
<%if v=1 then %>
<form action="guansa.asp?Action=<%=Action%>&amp;reid=<%=Request.QueryString("reid")%>&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>" method="post">
<%end if%>
			<select name="bbsid">
			<option value="0">选择论坛分类</option>
			<%
			dim i
			Set Rs = Server.CreateObject("Adodb.Recordset")
			Sql = "select id,[name] from qingtian_bbs where  [del]=0 and [view]=0 and [class]=0 order by [pid] asc"
			Rs.Open Sql,conn,1,1
			if not (rs.bof and rs.eof)  then


				For i=1 to rs.RecordCount
			%><option value="<%=rs("id")%>"><%=qingtian.utf8(rs("name"))%></option><%
				Rs.MoveNext
				Next

			end if
			Rs.close
			set rs=nothing
			%>
				</select><br/>
<%if v=0 then %>
			<anchor>确定<%=txt%>
    			<go href="guansa.asp?Action=<%=Action%>&amp;reid=<%=Request.QueryString("reid")%>&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>" method='post'>
        		<postfield name="bbsid" value="$(bbsid)"/>
    			</go>
			</anchor><br/>
<%else%>
<input type="submit" value="确定<%=txt%>"/>
</form>
<%end if%>
		<%elseif Action="zuan" then%>
			<%=sou%>选择专题分类<%=we0%>
<%if v=1 then %>
<form action="guansa.asp?Action=<%=Action%>&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;sid=<%=sidd%>" method="post">
<%end if%>
			<select name="bbsid">
			<option value="0">选择专题分类</option>
			<%
			dim j
			Set Rs = Server.CreateObject("Adodb.Recordset")
			Sql = "select id,[name] from qingtian_zuan where litsid="&listid&" order by [id] asc"
			Rs.Open Sql,conn,1,1
			if not (rs.bof and rs.eof)  then
				For j=1 to rs.RecordCount
			%><option value="<%=rs("id")%>"><%=qingtian.utf8(rs("name"))%></option><%
				Rs.MoveNext
				Next

			end if
			Rs.close
			set rs=nothing
			%>
				</select><br/>
<%if v=0 then %>
			<anchor>确定<%=txt%>
    			<go href="guansa.asp?Action=<%=Action%>&amp;listid=<%=listid%>&amp;id=<%=id%>&amp;sid=<%=sidd%>" method='post'>
        		<postfield name="bbsid" value="$(bbsid)"/>
    			</go>
			</anchor><br/>
<%else%>
<input type="submit" value="确定<%=txt%>"/>
</form>
<%end if%>
                 <%else
if action="jt" then
%>
<%=we%>请选择置顶方式:<br/><a href="guansa.asp?Action=<%=Action%>&amp;reid=<%=Request.QueryString("reid")%>&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">只本版置顶</a><br/><a href="guansa.asp?act=1&amp;Action=<%=Action%>&amp;reid=<%=Request.QueryString("reid")%>&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">全论坛置顶</a><%=we0%>
<%else%>
<%=we%><a href="guansa.asp?Action=<%=Action%>&amp;reid=<%=Request.QueryString("reid")%>&amp;id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">确定<%=txt%></a><%=we0%>
		<%end if%>
		<%end if%>
		<%else%>
		<%=we%>你无权<%=txt%>该帖子<%=we0%>
		<%end if%>
		<%=sou%><a href="viewv.asp?id=<%=id%>&amp;listid=<%=listid%>&amp;pageid=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子</a><br/>
		<a href="board.asp?listid=<%=listid%>&amp;page=<%=pageid%>&amp;sid=<%=sidd%>">返回帖子列表</a><%=we0%>
		
		<%
end if
End Function
%>
